export const data = [
  {
    name: '装载机',
    number: '1101',
    hasSensor: '是',
    person: '周',
    group: true,
    open: true,
    children: [
      {
        name: '传动系统',
        number: '11011',
        hasSensor: '否',
        person: '周',
        group: true,
        children: [
          {
            name: '传动系统1',
            number: '110111',
            hasSensor: '否',
            person: '周'
          }
        ]
      },
      {
        name: '电气系统',
        number: '11012',
        hasSensor: '否',
        person: '周'
      },
      {
        name: '压力系统',
        number: '11013',
        hasSensor: '否',
        person: '周'
      }
    ]
  },
  {
    group: false,
    name: '鼓风机',
    number: '1102',
    hasSensor: '是',
    person: '周'
  },
  {
    group: false,
    name: '压缩机',
    number: '1103',
    hasSensor: '是',
    person: '周'
  }
]

export const columnsDef = [
  {
    headerName: '名称',
    field: 'name',
    cellRenderer: 'group',
    cellRendererParams: {
      innerRenderer:  (params) => {
        return params.data.name
      }
    },
    cellStyle: {
      'padding': '8px'
    }
  },
  {
    headerName: '编号',
    field: 'number',
    cellStyle: {
      'text-align': 'center',
      'padding': '8px'
    }
  },
  {
    headerName: '是否有传感器',
    field: 'hasSensor',
    cellStyle: {
      'text-align': 'center',
      'padding': '8px'
    }
  },
  {
    headerName: '负责人',
    field: 'person',
    cellStyle: {
      'text-align': 'center',
      'padding': '8px'
      // 'line-height': '34px'
    }
  },
  {
    headerName: '操作',
    cellStyle: {
      'text-align': 'center',
      'padding': '8px'
    }
  }
]
